package com.wwtech.epp.ui.adapter.work;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wwtech.epp.R;
import com.wwtech.epp.entity.Report;

import java.util.List;

/**
 * 作者：Android on 2017/10/12
 * 邮箱：365941593@qq.com
 * 描述：
 */

public class ReportListAdapter extends BaseQuickAdapter<Report, BaseViewHolder> {

    public ReportListAdapter(@Nullable List<Report> data) {
        super(R.layout.item_project_report, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, Report report) {
        baseViewHolder.setText(R.id.title, report.getTitle());
        if (baseViewHolder.getLayoutPosition() == 0) {
            baseViewHolder.setVisible(R.id.view, false);
        } else {
            baseViewHolder.setVisible(R.id.view, true);
        }
    }
}
